package cs575.wido.action;

import cs575.wido.MyPendingkListFactory;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.JOptionPane;

import cs575.wido.model.CurrentTaskModel;
import cs575.wido.model.PendingTaskModel;
import cs575.wido.ui.TaskWindow;

/**
 * Select the pending task in MyTaskWindow
 * @author Kevin Cheung
 *
 */
public class PendingTaskAction extends AbstractAction {
	private TaskWindow parent;
	
	public PendingTaskAction(TaskWindow parent) {
		putValue(NAME, "pending task");
		this.parent = parent;
	}
	
	@Override
	public void actionPerformed(ActionEvent arg0) {
		parent.setTaskModel(new PendingTaskModel(parent.getFactory()));
	}
	
	public String toString() {
		return "pending task";
	}
}
